[b4b313]: / Image Segmentation / Image Utility Functions / extraction / maskCreationRegionGrowing.m

Download this file

42 lines (27 with data), 789 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
function [ masks ] = maskCreationRegionGrowing(segmentedImages)
%noduleExtractionRegionGrowing Summary of this function goes here
% param orgImage
% a the original image that will be segmented
%
%
% param segmentedImages
% a cell array of each image segmentation
%
%
%
%% Pre-process
%Get the number of segmentations
dimensions = size(segmentedImages);
segTotal = dimensions(2);
%set up cell array for images
masks{segTotal} = [];
%% extract nodule
for i=1:segTotal
%get segmented image
s = segmentedImages{i};
%fill holes in region growing
s = imfill(s,'holes');
%save the mask
masks{i} = s;
end
end